package com.sqlcheck.dto.request;

import lombok.Data;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;
import io.swagger.v3.oas.annotations.media.Schema;

@Data
@Schema(description = "员工登录请求")
public class LoginRequest {

    @NotBlank(message = "工号不能为空")
    @Pattern(regexp = "^(\\d{6}|K\\d{7})$", message = "工号格式不正确，请输入6位数字工号或K开头+7位数字工号")
    @Schema(description = "员工工号", example = "123456", required = true)
    private String employeeId;

    @NotBlank(message = "密码不能为空")
    @Size(min = 6, max = 20, message = "密码长度必须在6-20位之间")
    @Schema(description = "登录密码", example = "000000", required = true)
    private String password;
}